#pragma once

#include "NFComm/NFPluginModule/NFIGameConfigInterface.h"
#include "NFComm/NFCore/NFMapEx.hpp"
#include "NFComm/NFPluginModule/NFPlatform.h"

class NFIKernelModule;
class NFIClassModule;
class NFIElementModule;

class NFGameConfigInterfaceModule : public NFIGameConfigInterfaceModule
{
public:
    NFGameConfigInterfaceModule(NFIPluginManager* p)
    {
        pPluginManager = p;
    }
public:
    virtual bool Init();
    virtual bool Shut();
    virtual bool Execute();

    virtual bool AfterInit();
public:
    virtual NF_SHARE_PTR<QIPaiGameConfigParameter> GetGameConfigParameter(const std::string& gameName);
    virtual NF_SHARE_PTR<QIPaiGameConfigParameter> GetGameConfigParameter(int gameId);
private:
    NFIKernelModule* m_pKernelModule;
    NFIClassModule* m_pClassModule;
    NFIElementModule* m_pElementModule;
private:
    std::map<std::string, int>  mapGameNameToGameId;
    NFMapEx<int, QIPaiGameConfigParameter>      mapGameConfig;
};